import {Service, action} from "adajs";

class SettinghelpService extends Service {
    defaultData() {
        return {
            title: "设置",
            content: "",
            isLoading: true
        };
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }

    @action("get")
    get(current) {
        return this.context.request.post('/api/admin/lgb/currency/get').then(a => {
            if (a.code != 1) {
                current.content = a.msg;
            } else {
                current.content = a.data;
            }
            current.isLoading = false;
        });
    }
}

export default SettinghelpService;